import http from '@/utils/http.js'

// 注册
export function registerUser(data) {
	return http.post('/user/register', {
		data,
		showLoading: false,
		requestTaskKey: 'register',
		isForm: true
	})
}

// 登录
export function loginUser(data) {
	return http.post('/user/login', {
		data,
		showLoading: false,
		requestTaskKey: 'login',
		isForm: true
	})
}


// 获取阿里云OSS临时上传Token
export function getAliSts(data) {
	return http.post('/user/getAlicloudSTS', {
		data,
		showLoading: false,
		requestTaskKey: 'getAlicloudSTS',
		isForm: true
	})
}

// 交易 资金明细
export function getUserPriceAll1(data) {
	return http.get('/user/getUserPrice_all1', {
		data,
		showLoading: false,
		requestTaskKey: 'login',
		isForm: true
	})
}
// 个人中心 资金明细
export function getUserPriceAll(data) {
	return http.get('/user/getUserPrice_all', {
		data,
		showLoading: false,
		requestTaskKey: 'login',
		isForm: true
	})
}

// 用户信息
export function getUserInfo(data) {
	return http.get('/stock/info', {
		data,
		showLoading: false,
		requestTaskKey: 'getUserInfo'
	})
}
// 合同详情
export function contractDetail(data) {
	return http.get('/user/contractDetail', {
		data,
		showLoading: false,
		requestTaskKey: 'contractDetail'
	})
}
// 合同一模板
export function one(data) {
	return http.get('/stock/one', {
		data,
		showLoading: false,
		requestTaskKey: 'one'
	})
}
// 合同二模板
export function two(data) {
	return http.get('/stock/two', {
		data,
		showLoading: false,
		requestTaskKey: 'two'
	})
}
// 合同信息
export function getUserContracts(data) {
	return http.get('/stock/contracts', {
		data,
		showLoading: false,
		requestTaskKey: 'getUserContracts'
	})
}

//生成合同
export function createContract(data = {}) {
	return http.post('/stock/createContract', {
		data,
		showLoading: false,
		requestTaskKey: 'createContract',
		isForm: true
	})
}
//合同签名
export function doSign(data = {}) {
	return http.post('/user/dosignContract', {
		data,
		showLoading: false,
		requestTaskKey: 'doSign',
		isForm: true
	})
}
// 修改用户信息
export function userProfile(data) {
	return http.get('/user/profile', {
		data,
		showLoading: false,
		requestTaskKey: 'userProfile'
	})
}



//持仓
export function holdStock(data = {}) {
	return http.get('/deal/getNowWarehouse', {
		data,
		showLoading: false,
		requestTaskKey: 'holdStock',
	})
}

//配资持仓
export function holdStockPz(data = {}) {
	return http.get('/deal/getNowWarehouse_pz', {
		data,
		showLoading: false,
		requestTaskKey: 'holdStockPz',
	})
}
//融券持仓
export function holdStockRq(data = {}) {
	return http.get('/deal/getNowWarehouse_rq', {
		data,
		showLoading: false,
		requestTaskKey: 'holdStockRq',
	})
}

//打新记录
export function getMyNew(data = {}) {
	return http.get('/subscribe/getsgnewgu0', {
		data,
		showLoading: false,
		requestTaskKey: 'getMyNew',
	})
}


//认证信息
export function authInfo(data = {}) {
	return http.get('/user/authenticationDetail', {
		data,
		showLoading: false,
		requestTaskKey: 'authInfo',
	})
}

//认证操作
export function updataAuth(data = {}) {
	return http.post('/user/authentication', {
		data,
		showLoading: false,
		requestTaskKey: 'updataAuth',
		isForm: true
	})
}

//银行卡信息
export function bankList(data = {}) {

	return http.post('/user/accountLst', {
		data,
		showLoading: false,
		requestTaskKey: 'bankList',

	})
}

//绑定银行卡操作
export function bindAccount(data = {}) {
	return http.post('/user/bindaccount', {
		data,
		showLoading: false,
		requestTaskKey: 'bindAccount',

	})
}
//验证用户原支付密码
export function checkOldpay(data = {}) {
	return http.post('/user/checkOldpay', {
		data,
		showLoading: false,
		requestTaskKey: 'checkOldpay',

	})
}
//修改支付密码
export function editPass(data = {}) {
	return http.post('/user/editPass', {
		data,
		showLoading: false,
		requestTaskKey: 'editPass',

	})
}

//修改登录密码
export function editPass1(data = {}) {
	return http.post('/user/editPass1', {
		data,
		showLoading: false,
		requestTaskKey: 'editPass1',

	})
}

//获取仓位
export function mrSellLst(data = {}) {
	return http.get('/deal/mrSellLst', {
		data,
		showLoading: false,
		requestTaskKey: 'mrSellLst',

	})
}
//获取融券仓位
export function mrSellLstRq(data = {}) {
	return http.get('/deal/mrSellLstRq', {
		data,
		showLoading: false,
		requestTaskKey: 'mrSellLstRq',

	})
}

//用户提交充值
export function recharge(data = {}) {
	return http.post('/user/recharge', {
		data,
		showLoading: false,
		requestTaskKey: 'recharge',
	})
}
//平台银行卡
export function getyhkconfignew(data = {}) {
	return http.get('/index/getyhkconfignew', {
		data,
		showLoading: false,
		requestTaskKey: 'getyhkconfignew',
	})
}

//转入记录
export function capitalLog(data = {}) {
	return http.get('/user/capitalLog', {
		data,
		showLoading: false,
		requestTaskKey: 'capitalLog',
	})
}

//转出
export function applyWithdraw(data = {}) {
	return http.get('/user/applyWithdraw', {
		data,
		showLoading: false,
		requestTaskKey: 'applyWithdraw',
	})
}

//委托记录
export function entrustList(data = {}) {
	return http.get('/deal/getNowWarehouse_weituo', {
		data,
		showLoading: false,
		requestTaskKey: 'entrustList',
	})
}

//取消委托
export function cancleEntrust(data = {}) {
	return http.get('/deal/cheAll', {
		data,
		showLoading: false,
		requestTaskKey: 'cancleEntrust',
	})
}

//取消委托
export function holdingHistory(data = {}) {
	return http.get('/deal/getNowWarehouse_lishi', {
		data,
		showLoading: false,
		requestTaskKey: 'holdingHistory',
	})
}